<!--  -->
<template>
  <DefineTemplate>
    <div>{{ list }}</div>
  </DefineTemplate>

  <div class="lsh-box">
    <div>
      <ReuseTemplate />
    </div>
    <div>
      <ReuseTemplate />
    </div>
    <div>{{ arr }}</div>
    <button @click="list.push(11)">点击</button>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import { createReusableTemplate } from "@vueuse/core";
import { computed } from "vue";

const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
const arr = ref([Array.from({length:10},(_,i)=>{
  return i
})]);
const index = ref(0);
const list = computed(()=>{
  return arr.value[index.value]
})
</script>
<style scoped lang="less">
.lsh-box{

}
</style>
